Skip to content

[leancode_force_update] Upgrade in_app_update to ^5.0.0 - #562

Merged
PiotrRogulski merged 2 commits into
masterfrom
claude/leancode-force-update-deps-tcuywb
Aug 14, 2026
Merged

PiotrRogulski merged 2 commits into
masterfrom
claude/leancode-force-update-deps-tcuywb

Conversation

@PiotrRogulski

Copy link
Copy Markdown
Member

Recovers the 10 points lost on pub.dev's Support up-to-date dependencies → All of the package dependencies are supported in the latest version check.

Cause

in_app_update was the only dependency behind. Per the live pana report:

Package Constraint Compatible Latest
in_app_update ^4.2.3 4.2.5 5.0.0

Every other dependency already resolved to its latest version, so this one constraint accounted for the whole deduction.

Changes

in_app_update 5.0.0 has no Dart API changes — its changelog is only "migrate to Flutter's built-in Kotlin" (the plugin no longer applies the Kotlin Gradle Plugin or declares its classpath, and uses the kotlin { compilerOptions } DSL). Everything force_update_guard.dart uses — checkForUpdate, startFlexibleUpdate, completeFlexibleUpdate, performImmediateUpdate, AppUpdateInfo.immediateUpdateAllowed — is unchanged, so the package's own source needed no edits.

It does require Dart ^3.12.0 / Flutter >=3.44.0, so the environment constraints move up with it:

  • pubspec.yaml: in_app_update: ^5.0.0, sdk: '>=3.12.0 <4.0.0', flutter: ">=3.44.0", version → 1.0.5-alpha
  • leancode_force_update-test.yml: min-version matrix entry 3.38.x → 3.44.x (the publish workflow already pinned Dart 3.12 / Flutter 3.44.x and needed nothing)
  • example/: SDK floor bumped, pubspec.lock regenerated

Example: private initializing formals

Raising the example's SDK floor also raises its language version, which made prefer_initializing_formals start firing on the old workaround idiom:

required ForceUpdateController forceUpdateController,
}) : _forceUpdateController = forceUpdateController;

Since Dart 3.12 a named initializing formal this._foo is passed by callers as foo, so the workaround is redundant and the lint flags it. Fixed via dart fix --apply (4 fixes across 3 files); call sites are unchanged. Without this, the bumped CI matrix would have gone red.

The regenerated example/pubspec.lock also picks up drift that was already stale on master — it still pinned leancode_contracts 0.9.0 and leancode_force_update 1.0.3-alpha.

Verification

Run locally on Flutter 3.44.0 / Dart 3.12.0 — deliberately the exact floor the pubspec now declares, rather than 3.44.x:

  • flutter analyze → no issues
  • flutter test → 8/8 passing
  • flutter pub publish --dry-run → clean (only the standard "not an incremental update" hint that every -alpha release in this package triggers)
  • pana → 160/160, with 10/10 points: All of the package dependencies are supported in the latest version

Out of scope

The example's Android toolchain is stale and untested here — android/build.gradle pins Kotlin 1.7.10 / AGP 7.3.0 with Gradle 7.5 in the legacy apply plugin layout. That was already incompatible with the Flutter floor this package declared before this PR, and nothing in CI builds the example APK, so modernizing it is left as separate work.


Generated by Claude Code

claude added 2 commits August 10, 2026 08:22
`in_app_update` 5.0.0 was the only dependency holding the package back
from pub.dev's "All of the package dependencies are supported in the
latest version" check, costing 10 points.

5.0.0 introduces no Dart API changes — it only drops the plugin's own
Kotlin Gradle Plugin application/classpath in favour of Flutter's
built-in Kotlin, and in turn requires Flutter 3.44 / Dart 3.12. Raise
the package's environment constraints to match, and bump the test
workflow's minimum Flutter version accordingly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016qFnig238knodtGNYgz7cK
…mple

Raising the example's SDK floor to 3.12 also raises its language
version, which makes `prefer_initializing_formals` fire on the old
`required Foo foo` + `_foo = foo` workaround: since Dart 3.12 a named
initializing formal `this._foo` is passed by callers as `foo`, so the
workaround is no longer needed. Applied via `dart fix`; the call sites
are unchanged.

Also regenerates the example lockfile via `flutter pub get` (it was
stale on master — still pinning leancode_contracts 0.9.0 and
leancode_force_update 1.0.3-alpha).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016qFnig238knodtGNYgz7cK
@github-actions github-actions Bot added the p: leancode_force_update Related to the leancode_force_update package label Aug 10, 2026
@PiotrRogulski
PiotrRogulski merged commit 9110c58 into master Aug 14, 2026
5 checks passed
@PiotrRogulski
PiotrRogulski deleted the claude/leancode-force-update-deps-tcuywb branch August 14, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: leancode_force_update Related to the leancode_force_update package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants